package com.example.school.controller.user;

import com.example.school.dto.UserAddMoneyDto;
import com.example.school.service.WaterService;
import com.example.school.utils.common.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user/water")
public class WaterController {

    @Autowired
    private WaterService waterService;

    @GetMapping("get_water_money")
    public Result getWaterMoney(){
        return waterService.getWaterMoney();
    }

    @PostMapping("add_water_money")
    public Result addWaterMoney(@RequestBody UserAddMoneyDto dto){
        return waterService.addWaterMoney(dto);
    }


}
